 google.load('search', '1.0');

    function OnLoad() {
	var qtxt = document.getElementById("querytxt").value;
	var searcher;
	searcher=new google.search.WebSearch();
	searcher.setUserDefinedLabel("搜一搜");

      // Create a search control
      var searchControl = new google.search.SearchControl();
	  searchControl.setResultSetSize(google.search.Search.LARGE_RESULTSET);
	  searchControl.setNoResultsString("对不起您的搜索不存在,请重试!呵呵呵");

      searchControl.addSearcher(searcher);

      var drawOptions = new google.search.DrawOptions();
      drawOptions.setDrawMode(google.search.SearchControl.DRAW_MODE_TABBED);
      searchControl.draw(document.getElementById("searchcontrol"), drawOptions);

      // execute an inital search
      searchControl.execute(qtxt);
    }
    
    google.setOnLoadCallback(OnLoad, true);